/*
 * @Author: your name
 * @Date: 2022-04-16 15:55:44
 * @LastEditTime: 2022-04-16 17:57:37
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \mallAdmin\src\app\main\finance\finance-recovery-order\finance-recovery-order.service.ts
 */
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class FinanceRecoveryOrderService {

  serviceUrls = {
    recoveryOrderListUrl: '/recycleOrder/findI5RecycleOrder', // 查询财务回收订单list
    exportRecoveryOrderUrl: '/recycleOrder/findMallOrderExcel', // Export财务回收订单
    subPaymentUrl: '/recycleOrder/batchPayOrder' // 打款失败 | 完成
  }

  constructor(public httpClient: HttpClient) { }

  // 查询财务回收订单list
  queryRecoveryOrderList(params: any) {
    return this.httpClient.post(this.serviceUrls.recoveryOrderListUrl, params).toPromise();
  }

  // Export财务回收订单
  exportRecoveryOrderData(params: any) {
    return this.httpClient.get(this.serviceUrls.exportRecoveryOrderUrl, { params, responseType: 'blob' }).toPromise();
  }

  //打款失败 | 成功
  subPaymentData(params: any) {
    return this.httpClient.post(this.serviceUrls.subPaymentUrl, params).toPromise();
  }
}



